import request from '@/utils/request'

export function addHomework(data) {
  return request({
    method: 'post',
    url: '/homework',
    data
  })
}

export function getHomework(id) {
  return request({
    url: '/homework/' + id
  })
}

export function updateHomework(params) {
  const { id, ...data } = params
  return request({
    method: 'put',
    url: '/homework/' + id,
    data
  })
}

export function getMd(url) {
  return request({
    url
  })
}
